<%@page import="org.webcamp.results.dto.QuestionaryResult"%>
<%@page import="java.util.List"%>
<%@page import="org.webcamp.questionary.dto.Score"%>
<%@include file="check_user.jsp"%>
<%@include file="header.jsp"%>
	<%
		List<QuestionaryResult> userResults = (List<QuestionaryResult>)request.getAttribute("results");
	%>
	<div class="panel panel-info">
		<div class="panel-heading">Results</div>
		<div class="panel-body">
			<table class="table table-striped table-hover table-bordered">
				<thead>
					<tr>
						<td>#</td>
						<td>Date</td>
						<td>Questionary</td>
						<td>Score</td>
					</tr>
				</thead>
			<%for(int i = 0; i < userResults.size(); i++){ 
				QuestionaryResult r = userResults.get(i);
			%>
				<tr>
					<td><%=i + 1%></td>
					<td><%=r.getDate() %></td>
					<td><%=r.getQuestionaryName() %></td>
					<td><%=r.getResult() %></td>
				</tr>				
			<%} %>
			</table>
		</div>
	</div>
<%@include file="footer.jsp"%>